package admin.controllers;

import java.io.IOException;
import java.util.List;
import java.util.TreeMap;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import admin.data.RouteData;
import admin.data.StoreData;

import models.RouteModel;
import models.StoreModel;


public class ListRouteServlet extends HttpServlet {
	public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws IOException {
		response.setCharacterEncoding("UTF-8");
		
		RouteData routeData = new RouteData();
		List<RouteModel> listRoute = routeData.getListRoute(); 

		request.setAttribute("listRoute", listRoute);

		try {
			request.getRequestDispatcher("/admin/pages/list_route.jsp").forward(request, response);
		} catch (ServletException e) {
			e.printStackTrace();
		}
	}
}